group { name: "elm/slider/hidden/limit";
   parts {
      part { name: "elm.units.min"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            align: 1.0 0.5;
            text { font: FN; size: 10;
               text_class: "slider_text";
               min: 1 1;
               align: 0.0 0.5;
               ellipsis: -1;
            }
         }
      }
      part { name: "elm.units.max"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            align: 1.0 0.5;
            text { font: FN; size: 10;
               text_class: "slider_text";
               min: 1 1;
               align: 0.0 0.5;
               ellipsis: -1;
            }
         }
      }
   }
}

group { name: "elm/slider/horizontal/default";
   alias: "elm/slider/horizontal/disabled";
   alias: "elm/slider/horizontal/media_player/position/default";
   alias: "elm/slider/horizontal/media_player/position/flush";
   alias: "elm/slider/horizontal/media_player/volume/default";
   alias: "elm/slider/horizontal/media_player/volume/flush";
#define ICON    1
#define LABEL   2
#define END     4
#define UNITS   8
#define MASKBITS    15
#define INVERT  16
#define DISABLE 32
   script {
      public slmode;
      public eval_mode(m) {
         new ic = m & ICON;
         new l = m & LABEL;
         new e = m & END;
         new u = m & UNITS;
         new d = m & DISABLE;
         new i = m & INVERT;
         if (i) {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
               set_state(PART:"glow", "inverted", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
               set_state(PART:"glow", "disabled_inverted", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
               set_state(PART:"glow", "default", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
               set_state(PART:"glow", "disabled", 0.0);
            }
         }
         if (l) {
            if (!d) {
               set_state(PART:"elm.text", "visible", 0.0);
            } else {
               set_state(PART:"elm.text", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.text", "default", 0.0);
         }
         if (u) {
            if (!d) {
               set_state(PART:"elm.units", "visible", 0.0);
               set_state(PART:"limits", "visible", 0.0);
            } else {
               set_state(PART:"elm.units", "disabled_visible", 0.0);
               set_state(PART:"limits", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.units", "default", 0.0);
            set_state(PART:"limits", "default", 0.0);
         }
         if (ic) {
            set_state(PART:"elm.swallow.icon", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.icon", "default", 0.0);
         }
         if (e) {
            set_state(PART:"elm.swallow.end", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.end", "default", 0.0);
         }
         if (!d) {
            set_state(PART:"event", "default", 0.0);
            set_state(PART:"dis_clip", "default", 0.0);
            set_state(PART:"knob", "default", 0.0);
         } else {
            set_state(PART:"event", "disabled", 0.0);
            set_state(PART:"dis_clip", "disabled", 0.0);
            set_state(PART:"knob", "disabled", 0.0);
         }
      }
   }
   parts {
      part { name: "elm.swallow.bar"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            min: 40 20;
            max: 99999 20;
            align: 1.0 0.5;
            rel1.to_x: "elm.text";
            rel1.relative: 1.0 0.0;
            rel1.offset: 4 4;
            rel2.to_x: "limits";
            rel2.relative: 0.0 1.0;
            rel2.offset: -5 -5;
            offscale;
         }
      }
      part { name: "base"; type: RECT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "elm.swallow.bar";
            color_class: "/bg/normal/slider/base";
            min: 8 4;
            max: 99999 4;
            fixed: 0 1;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/bg/disabled/slider/base";
         }
      }
      part { name: "glow"; type: RECT; mouse_events: 0;
         description { state: "default" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.to: "base";
            rel2.relative: 0.5 1.0;
            rel2.to_x: "button";
            rel2.to_y: "base";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "inverted" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.5 0.0;
            rel1.to_x: "button";
            rel1.to_y: "base";
            rel2.to: "base";
         }
         description { state: "disabled_inverted" 0.0;
            inherit: "inverted" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
      }
      part { name: "dis_clip"; type: RECT;
         description { state: "default" 0.0;
            rel1.to: "elm.swallow.icon";
            rel2.to: "elm.swallow.end";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
      }
      part { name: "elm.swallow.icon"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 1 0;
            visible: 0;
            align: 0.0 0.5;
            rel1.offset: -1 4;
            rel2.offset: -1 -5;
            rel2.relative: 0.0 1.0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0; aspect_preference: VERTICAL;
            rel1.offset: 4 4;
            rel2.offset: 4 -5;
            min: ICMIN ICMIN;
         }
      }
      part { name: "elm.text"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            align: 0.0 0.5;
            rel1.to_x: "elm.swallow.icon";
            rel1.relative: 1.0 0.0;
            rel1.offset: -1 4;
            rel2.to_x: "elm.swallow.icon";
            rel2.relative: 1.0 1.0;
            rel2.offset: -1 -5;
            color_class: "/fg/normal/slider/text";
            text { font: FN; size: 10;
               text_class: "slider";
               min: 0 0;
               align: 0.0 0.5;
            }
            visible: 0;
            offscale;
            min: 0 ICMIN;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            fixed: 1 0;
            visible: 1;
            rel1.offset: 4 4;
            rel2.offset: 4 -5;
            text.min: 1 1;
            text.ellipsis: -1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text";
         }
      }
      part { name: "elm.swallow.end"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 1 0;
            visible: 0;
            align: 1.0 0.5;
            rel1.offset: 0 4;
            rel1.relative: 1.0 0.0;
            rel2.offset: -1 -5;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0;
            aspect_preference: VERTICAL;
            rel1.offset: -5 4;
            rel2.offset: -5 -5;
            min: ICMIN ICMIN;
         }
      }
      alias: "elm.units.min" "limits:elm.units.min";
      alias: "elm.units.max" "limits:elm.units.max";
      part { name: "limits"; type: GROUP; mouse_events: 0;
         source: "elm/slider/hidden/limit";
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            align: 1.0 0.5;
            min: SOURCE;
            fixed: 1 1;
            rel1.to_x: "elm.swallow.end";
            rel1.relative: 0.0 0.0;
            rel1.offset: 0 4;
            rel2.to_x: "elm.swallow.end";
            rel2.relative: 0.0 1.0;
            rel2.offset: -1 -5;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            rel1.offset: -5 4;
            rel2.offset: -5 -5;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            rel1.offset: -5 4;
            rel2.offset: -5 -5;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.units"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            fixed: 1 1;
            rel1.to_x: "limits";
            rel2.to_x: "limits";
            color_class: "/fg/normal/slider/text/units";
            text { font: FN; size: 10;
               text_class: "slider";
               align: 1.0 0.5;
               min: 1 1;
               ellipsis: -1;
            }
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text/units";
         }
      }
      part { name: "button"; type: GROUP; mouse_events: 0;
         source: "elm/slider/horizontal/indicator/default";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
         }
         description { state: "hidden" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "elm.dragable.slider"; type: RECT;
         scale: 1;
         dragable.x: 1 1 0;
         dragable.y: 0 0 0;
         dragable.confine: "elm.swallow.bar";
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            min: 16 16;
            max: 16 16;
            fixed: 1 1;
            rel1.relative: 0.5 0.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.relative: 0.5 1.0;
            rel2.to_x: "elm.swallow.bar";
         }
      }
     part { name: "knob"; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            image.normal: "i-radio";
            min: 16 16;
            max: 16 16;
            color_class: "/fg/normal/slider/knob";
         }
         description { state: "clicked" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/pressed/slider/knob";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/knob";
         }
      }
      part { name: "slideevent"; type: RECT; repeat_events: 0;
         scale: 1;
         ignore_flags: ON_HOLD;
         dragable.events: "elm.dragable.slider";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
         description { state: "default" 0.0;
            rel.to: "elm.dragable.slider";
         }
      }
      part { name: "event"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            visible: 0;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
   }
   programs {
      program { signal: "mouse,down,1"; source: "elm.dragable.slider";
         action:  STATE_SET "clicked" 0.0;
         target: "knob";
      }
      program { signal: "mouse,up,1"; source: "elm.dragable.slider";
         action:  STATE_SET "default" 0.0;
         target: "knob";
      }
      program { signal: "elm,state,indicator,show"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { signal: "elm,state,indicator,hide"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { signal: "mouse,down,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { name: "popup_show2";
         action:  STATE_SET "hidden" 0.0;
         target: "button";
      }
      program { signal: "mouse,up,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { name: "popup_hide2";
         action:  STATE_SET "default" 0.0;
         target: "button";
      }
      program { signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= LABEL; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~LABEL; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= ICON; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,icon,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~ICON; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { name: "end_show";
         signal: "elm,state,end,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= END; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { name: "end_hide";
         signal: "elm,state,end,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~END; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= UNITS; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         action: SIGNAL_EMIT "limits,visible" "elm";
         target: "limits";
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(slmode);
            m &= ~UNITS; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action: SIGNAL_EMIT "limits,hide" "elm";
         target: "limits";
      }
      program { signal: "elm,state,inverted,on"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= INVERT; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,inverted,off"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~INVERT; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= DISABLE; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~DISABLE; set_int(slmode, m);
            eval_mode(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef END
#undef UNITS
#undef MASKBITS
#undef INVERT
#undef DISABLE
}

group { name: "elm/slider/horizontal/indicator/default";
   alias: "elm/slider/horizontal/indicator/disabled";
   alias: "elm/slider/horizontal/popup/default";
   alias: "elm/slider/horizontal/indicator/media_player/position/default";
   alias: "elm/slider/horizontal/indicator/media_player/position/flush";
   alias: "elm/slider/horizontal/indicator/media_player/volume/default";
   alias: "elm/slider/horizontal/indicator/media_player/volume/flush";
   parts {
      part { name: "base"; type: SPACER;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            min: 20 20;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
         }
      }
      part { name: "clip"; type: RECT;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.indicator";
            rel1.offset: -100 -100;
            rel2.offset: 99 99;
            visible: 0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "bevel"; type: RECT; mouse_events: 0;
         clip_to: "clip";
         description { state: "default" 0.0;
            rel1.offset: -10 -10;
            rel.to: "elm.indicator";
            rel2.offset: 9 9;
            color_class: "/dim/normal/slider/indicator";
            offscale;
            visible: 0;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "elm.indicator"; type: TEXT; mouse_events: 0;
         clip_to: "clip";
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            align: 0.5 1.0;
            rel1.to: "base";
            rel1.relative: 0.0 -0.1;
            rel1.offset: 0 -12;
            rel2.to: "base";
            rel2.relative: 1.0 -0.1;
            rel2.offset: -1 -12;
            color_class: "/fg/normal/slider/indicator";
            text { font: FNBD; size: 10;
               min: 1 1;
               align: 0.5 1.0;
               text_class: "slider_indicator";
               ellipsis: -1;
            }
            visible: 0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
   }
   programs {
      program { signal: "elm,popup,show"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,popup,hide"; source: "elm";
         action:  STATE_SET "default" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,popup,hide"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,hide,done" "elm";
      }
      program { signal: "elm,state,val,show"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target: "clip";
      }
      program { signal: "elm,state,val,hide"; source: "elm";
         action:  STATE_SET "default" 0.0;
         target: "clip";
      }
      program { signal: "elm,state,indicator,show"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,state,indicator,hide"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,state,disabled"; source: "elm";
         action:  STATE_SET "disabled" 0.0;
         target:  "base";
      }
      program { signal: "elm,state,enabled"; source: "elm";
         action:  STATE_SET "default" 0.0;
         target:  "base";
      }
   }
}

group { name: "elm/slider/vertical/default";
   alias: "elm/slider/vertical/disabled";
   alias: "elm/slider/vertical/media_player/position/default";
   alias: "elm/slider/vertical/media_player/position/flush";
   alias: "elm/slider/vertical/media_player/volume/default";
   alias: "elm/slider/vertical/media_player/volume/flush";
#define ICON    1
#define LABEL   2
#define END     4
#define UNITS   8
#define MASKBITS    15
#define INVERT  16
#define DISABLE 32
   script {
      public slmode;
      public eval_mode(m) {
         new ic = m & ICON;
         new l = m & LABEL;
         new e = m & END;
         new u = m & UNITS;
         new d = m & DISABLE;
         new i = m & INVERT;
         if (i) {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
               set_state(PART:"glow", "inverted", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
               set_state(PART:"glow", "disabled_inverted", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
               set_state(PART:"glow", "default", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
               set_state(PART:"glow", "disabled", 0.0);
            }
         }
         if (l) {
            if (!d) {
               set_state(PART:"elm.text", "visible", 0.0);
            } else {
               set_state(PART:"elm.text", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.text", "default", 0.0);
         }
         if (u) {
            if (!d) {
               set_state(PART:"elm.units", "visible", 0.0);
               set_state(PART:"limits", "visible", 0.0);
            } else {
               set_state(PART:"elm.units", "disabled_visible", 0.0);
               set_state(PART:"limits", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.units", "default", 0.0);
            set_state(PART:"limits", "default", 0.0);
         }
         if (ic) {
            set_state(PART:"elm.swallow.icon", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.icon", "default", 0.0);
         }
         if (e) {
            set_state(PART:"elm.swallow.end", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.end", "default", 0.0);
         }
         if (!d) {
            set_state(PART:"event", "default", 0.0);
            set_state(PART:"dis_clip", "default", 0.0);
            set_state(PART:"knob", "default", 0.0);
         } else {
            set_state(PART:"event", "disabled", 0.0);
            set_state(PART:"dis_clip", "disabled", 0.0);
            set_state(PART:"knob", "disabled", 0.0);
         }
      }
   }
   parts {
      part { name: "elm.swallow.bar"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            min: 20 40;
            max: 20 99999;
            align: 0.5 1.0;
            rel1.to_y: "elm.text";
            rel1.relative: 0.0 1.0;
            rel1.offset: 4 4;
            rel2.to_y: "limits";
            rel2.relative: 1.0 0.0;
            rel2.offset: -5 -5;
            offscale;
         }
      }
      part { name: "base"; type: RECT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "elm.swallow.bar";
            color_class: "/bg/normal/slider/base";
            min: 4 8;
            max: 4 99999;
            fixed: 1 0;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/bg/disabled/slider/base";
         }
      }
      part { name: "glow"; type: RECT; mouse_events: 0;
         description { state: "default" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.to: "base";
            rel2.relative: 1.0 0.5;
            rel2.to_y: "button";
            rel2.to_x: "base";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "inverted" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.0 0.5;
            rel1.to_y: "button";
            rel1.to_x: "base";
            rel2.to: "base";
         }
         description { state: "disabled_inverted" 0.0;
            inherit: "inverted" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
      }
      part { name: "dis_clip"; type: RECT;
         description { state: "default" 0.0;
            rel1.to: "elm.swallow.icon";
            rel2.to: "elm.swallow.end";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.swallow.icon"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 0 1;
            visible: 0;
            align: 0.5 0.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.to_x: "elm.swallow.bar";
            rel1.offset: 4 -1;
            rel2.offset: -5 -1;
            rel2.relative: 1.0 0.0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0; aspect_preference: VERTICAL;
            rel1.offset: 4 4;
            rel2.offset: -5 4;
            min: ICMIN ICMIN;
         }
      }
      part { name: "elm.text"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 0 1;
            align: 0.5 0.0;
            rel1.to_y: "elm.swallow.icon";
            rel1.relative: 0.0 1.0;
            rel1.offset: 4 -1;
            rel2.to_y: "elm.swallow.icon";
            rel2.relative: 1.0 1.0;
            rel2.offset: -5 -1;
            color_class: "/fg/normal/slider/text";
            text { font: FN; size: 10;
               text_class: "slider";
               min: 0 0;
               align: 0.5 0.0;
            }
            visible: 0;
            offscale;
            min: 0 ICMIN;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            rel1.offset: 4 4;
            rel2.offset: -5 4;
            text.min: 1 1;
            text.ellipsis: -1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text";
         }
      }
      part { name: "elm.swallow.end"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 0 1;
            visible: 0;
            align: 0.5 1.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.to_x: "elm.swallow.bar";
            rel1.offset: 4 0;
            rel1.relative: 0.0 1.0;
            rel2.offset: -5 -1;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0;
            aspect_preference: VERTICAL;
            rel1.offset: 4 -5;
            rel2.offset: -5 -5;
            min: ICMIN ICMIN;
         }
      }
      alias: "elm.units.min" "limits:elm.units.min";
      alias: "elm.units.max" "limits:elm.units.max";
      part { name: "limits"; type: GROUP; mouse_events: 0;
         source: "elm/slider/hidden/limit";
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            align: 0.5 1.0;
            max: 0 0;
            fixed: 1 1;
            rel1.to_y: "elm.swallow.end";
            rel1.relative: 0.0 0.0;
            rel1.offset: 4 0;
            rel2.to_y: "elm.swallow.end";
            rel2.relative: 1.0 0.0;
            rel2.offset: -5 -1;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            min: SOURCE;
            max: 9999 9999;
            rel1.offset: 4 -5;
            rel2.offset: -5 -5;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "default" 0.0;
            min: SOURCE;
            max: 9999 9999;
            rel1.offset: 4 -5;
            rel2.offset: -5 -5;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.units"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            fixed: 1 1;
            rel1.to_y: "limits";
            rel2.to_y: "limits";
            color_class: "/fg/normal/slider/text/units";
            text { font: FN; size: 10;
               text_class: "slider";
               align: 0.5 1.0;
               min: 1 1;
               ellipsis: -1;
            }
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text/units";
         }
      }
      part { name: "button"; type: GROUP; mouse_events: 0;
         source: "elm/slider/vertical/indicator/default";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
         }
         description { state: "hidden" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "elm.dragable.slider"; type: RECT;
         scale: 1;
         dragable.x: 0 0 0;
         dragable.y: 1 1 0;
         dragable.confine: "elm.swallow.bar";
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            min: 16 16;
            max: 16 16;
            fixed: 1 1;
            rel1.relative: 0.0 0.5;
            rel1.to_y: "elm.swallow.bar";
            rel2.relative: 1.0 0.5;
            rel2.to_y: "elm.swallow.bar";
         }
      }
      part { name: "knob"; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            image.normal: "i-radio";
            min: 16 16;
            max: 16 16;
            color_class: "/fg/normal/slider/knob";
         }
         description { state: "clicked" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/pressed/slider/knob";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/knob";
         }
      }
      part { name: "slideevent"; type: RECT; repeat_events: 0;
         scale: 1;
         ignore_flags: ON_HOLD;
         dragable.events: "elm.dragable.slider";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
         description { state: "default" 0.0;
            rel.to: "elm.dragable.slider";
         }
      }
      part { name: "event"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            visible: 0;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
   }
   programs {
      program { signal: "mouse,down,1"; source: "elm.dragable.slider";
         action:  STATE_SET "clicked" 0.0;
         target: "knob";
      }
      program { signal: "mouse,up,1"; source: "elm.dragable.slider";
         action:  STATE_SET "default" 0.0;
         target: "knob";
      }
      program { signal: "elm,state,indicator,show"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { signal: "elm,state,indicator,hide"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { signal: "mouse,down,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { name: "popup_show2";
         action:  STATE_SET "hidden" 0.0;
         target: "button";
      }
      program { signal: "mouse,up,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { name: "popup_hide2";
         action:  STATE_SET "default" 0.0;
         target: "button";
      }
      program { signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= LABEL; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~LABEL; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= ICON; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,icon,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~ICON; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { name: "end_show";
         signal: "elm,state,end,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= END; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { name: "end_hide";
         signal: "elm,state,end,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~END; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= UNITS; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         action: SIGNAL_EMIT "limits,visible" "elm";
         target: "limits";
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(slmode);
            m &= ~UNITS; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action: SIGNAL_EMIT "limits,hide" "elm";
         target: "limits";
      }
      program { signal: "elm,state,inverted,on"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= INVERT; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,inverted,off"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~INVERT; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= DISABLE; set_int(slmode, m);
            eval_mode(m);
         }
      }
      program { signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~DISABLE; set_int(slmode, m);
            eval_mode(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef END
#undef UNITS
#undef MASKBITS
#undef INVERT
#undef DISABLE
}

group { name: "elm/slider/vertical/indicator/default";
   alias: "elm/slider/vertical/indicator/disabled";
   alias: "elm/slider/vertical/popup/default";
   alias: "elm/slider/vertical/indicator/media_player/position/default";
   alias: "elm/slider/vertical/indicator/media_player/position/flush";
   alias: "elm/slider/vertical/indicator/media_player/volume/default";
   alias: "elm/slider/vertical/indicator/media_player/volume/flush";
   parts {
      part { name: "base"; type: SPACER;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            min: 20 20;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
         }
      }
      part { name: "clip"; type: RECT;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.indicator";
            rel1.offset: -100 -100;
            rel2.offset: 99 99;
            visible: 0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "bevel"; type: RECT; mouse_events: 0;
         clip_to: "clip";
         description { state: "default" 0.0;
            rel1.offset: -10 -10;
            rel.to: "elm.indicator";
            rel2.offset: 9 9;
            color_class: "/dim/normal/slider/indicator";
            visible: 0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "elm.indicator"; type: TEXT; mouse_events: 0;
         clip_to: "clip";
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            align: 0.0 0.5;
            rel1.to: "base";
            rel1.relative: 1.1 0.0;
            rel1.offset: 11 0;
            rel2.to: "base";
            rel2.relative: 1.1 1.0;
            rel2.offset: 11 -1;
            color_class: "/fg/normal/slider/indicator";
            text { font: FNBD; size: 10;
               min: 1 1;
               align: 0.0 0.5;
               text_class: "slider_indicator";
               ellipsis: -1;
            }
            visible: 0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
   }
   programs {
      program { signal: "elm,popup,show"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,popup,hide"; source: "elm";
         action:  STATE_SET "default" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,popup,hide"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,hide,done" "elm";
      }
      program { signal: "elm,state,val,show"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target: "clip";
      }
      program { signal: "elm,state,val,hide"; source: "elm";
         action:  STATE_SET "default" 0.0;
         target: "clip";
      }
      program { signal: "elm,state,indicator,show"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal: "elm,state,indicator,hide"; source: "elm";
         action:  STATE_SET "visible" 0.0;
         target:  "elm.indicator";
         target:  "bevel";
      }
      program { signal:  "elm,state,disabled"; source: "elm";
         action:  STATE_SET "disabled" 0.0;
         target:  "base";
      }
      program { signal: "elm,state,enabled"; source: "elm";
         action:  STATE_SET "default" 0.0;
         target:  "base";
      }
   }
}

//Range

group { name: "elm/slider/range/horizontal/default";
   alias: "elm/range/horizontal/disabled";
#define ICON    1
#define LABEL   2
#define END     4
#define UNITS   8
#define MASKBITS    15
#define INVERT  16
#define DISABLE 32
   script {
      public slmode;
      public range;
      public update_glow(m) {
         new d = m & DISABLE;
         new i = m & INVERT;
         new r = get_int(range);
         if (r) {
            new x1, y1, w1, h1, x2, y2, w2, h2;
            get_geometry(PART:"knob", x1, y1, w1, h1);
            get_geometry(PART:"knob2", x2, y2, w2, h2);
            if (d) {
               if (x2 < x1) {
                 set_state(PART:"glow", "disabled_range_reverse", 0.0);
               } else {
                 set_state(PART:"glow", "disabled_range", 0.0);
               }
            } else {
               if (x2 < x1) {
                 set_state(PART:"glow", "range_reverse", 0.0);
               } else {
                 set_state(PART:"glow", "range", 0.0);
               }
            }
         } else {
            if (d) {
               if (i) {
                  set_state(PART:"glow", "disabled_inverted", 0.0);
               } else {
                  set_state(PART:"glow", "disabled", 0.0);
               }
            } else {
               if (i) {
                  set_state(PART:"glow", "default", 0.0);
               } else {
                  set_state(PART:"glow", "inverted", 0.0);
               }
            }
         }
      }
      public eval_mode(m) {
         new ic = m & ICON;
         new l = m & LABEL;
         new e = m & END;
         new u = m & UNITS;
         new d = m & DISABLE;
         new i = m & INVERT;
         if (i) {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
            }
         }
         if (l) {
            if (!d) {
               set_state(PART:"elm.text", "visible", 0.0);
            } else {
               set_state(PART:"elm.text", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.text", "default", 0.0);
         }
         if (u) {
            if (!d) {
               set_state(PART:"elm.units", "visible", 0.0);
               set_state(PART:"limits", "visible", 0.0);
            } else {
               set_state(PART:"elm.units", "disabled_visible", 0.0);
               set_state(PART:"limits", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.units", "default", 0.0);
            set_state(PART:"limits", "default", 0.0);
         }
         if (ic) {
            set_state(PART:"elm.swallow.icon", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.icon", "default", 0.0);
         }
         if (e) {
            set_state(PART:"elm.swallow.end", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.end", "default", 0.0);
         }
         if (!d) {
            set_state(PART:"event", "default", 0.0);
            set_state(PART:"dis_clip", "default", 0.0);
            set_state(PART:"knob", "default", 0.0);
            set_state(PART:"knob2", "default", 0.0);
         } else {
            set_state(PART:"event", "disabled", 0.0);
            set_state(PART:"dis_clip", "disabled", 0.0);
            set_state(PART:"knob", "disabled", 0.0);
            set_state(PART:"knob2", "disabled", 0.0);
         }
      }
   }
   parts {
      part { name: "elm.swallow.bar"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            min: 40 20;
            max: 99999 20;
            align: 1.0 0.5;
            rel1.to_x: "elm.text";
            rel1.relative: 1.0 0.0;
            rel1.offset: 4 4;
            rel2.to_x: "limits";
            rel2.relative: 0.0 1.0;
            rel2.offset: -5 -5;
            offscale;
         }
      }
      part { name: "base"; type: RECT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "elm.swallow.bar";
            color_class: "/bg/normal/slider/base";
            min: 8 4;
            max: 99999 4;
            fixed: 0 1;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/bg/disabled/slider/base";
         }
      }
      part { name: "glow"; type: RECT; mouse_events: 0;
         description { state: "default" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.to: "base";
            rel2.relative: 0.5 1.0;
            rel2.to_x: "button";
            rel2.to_y: "base";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "inverted" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.5 0.0;
            rel1.to_x: "button";
            rel1.to_y: "base";
            rel2.to: "base";
         }
         description { state: "disabled_inverted" 0.0;
            inherit: "inverted" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "range" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.5 0.0;
            rel2.relative: 0.5 1.0;
            rel1.to_x: "button";
            rel2.to_x: "button2";
            rel1.to_y: "base";
            rel2.to_y: "base";
         }
         description { state: "disabled_range" 0.0;
            inherit: "range" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "range_reverse" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.5 0.0;
            rel2.relative: 0.5 1.0;
            rel1.to_x: "button2";
            rel2.to_x: "button";
            rel1.to_y: "base";
            rel2.to_y: "base";
         }
         description { state: "disabled_range_reverse" 0.0;
            inherit: "range_reverse" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
      }
      part { name: "dis_clip"; type: RECT;
         description { state: "default" 0.0;
            rel1.to: "elm.swallow.icon";
            rel2.to: "elm.swallow.end";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.swallow.icon"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 1 0;
            visible: 0;
            align: 0.0 0.5;
            rel1.offset: -1 4;
            rel2.offset: -1 -5;
            rel2.relative: 0.0 1.0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0; aspect_preference: VERTICAL;
            rel1.offset: 4 4;
            rel2.offset: 4 -5;
            min: ICMIN ICMIN;
         }
      }
      part { name: "elm.text"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            align: 0.0 0.5;
            rel1.to_x: "elm.swallow.icon";
            rel1.relative: 1.0 0.0;
            rel1.offset: -1 4;
            rel2.to_x: "elm.swallow.icon";
            rel2.relative: 1.0 1.0;
            rel2.offset: -1 -5;
            color_class: "/fg/normal/slider/text";
            text { font: FN; size: 10;
               text_class: "slider";
               min: 0 0;
               align: 0.0 0.5;
            }
            visible: 0;
            offscale;
            min: 0 ICMIN;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            fixed: 1 0;
            visible: 1;
            rel1.offset: 4 4;
            rel2.offset: 4 -5;
            text.min: 1 1;
            text.ellipsis: -1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text";
         }
      }
      part { name: "elm.swallow.end"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 1 0;
            visible: 0;
            align: 1.0 0.5;
            rel1.offset: 0 4;
            rel1.relative: 1.0 0.0;
            rel2.offset: -1 -5;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0;
            aspect_preference: VERTICAL;
            rel1.offset: -5 4;
            rel2.offset: -5 -5;
            min: ICMIN ICMIN;
         }
      }
      alias: "elm.units.min" "limits:elm.units.min";
      alias: "elm.units.max" "limits:elm.units.max";
      part { name: "limits"; type: GROUP; mouse_events: 0;
         source: "elm/slider/hidden/limit";
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            align: 1.0 0.5;
            min: SOURCE;
            fixed: 1 1;
            rel1.to_x: "elm.swallow.end";
            rel1.relative: 0.0 0.0;
            rel1.offset: 0 4;
            rel2.to_x: "elm.swallow.end";
            rel2.relative: 0.0 1.0;
            rel2.offset: -1 -5;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            rel1.offset: -5 4;
            rel2.offset: -5 -5;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            rel1.offset: -5 4;
            rel2.offset: -5 -5;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.units"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            fixed: 1 1;
            rel1.to_x: "limits";
            rel2.to_x: "limits";
            color_class: "/fg/normal/slider/text/units";
            text { font: FN; size: 10;
               text_class: "slider";
               align: 1.0 0.5;
               min: 1 1;
               ellipsis: -1;
            }
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text/units";
         }
      }
      part { name: "button"; type: GROUP; mouse_events: 0;
         source: "elm/slider/horizontal/indicator/default";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
         }
         description { state: "hidden" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "elm.dragable.slider"; type: RECT;
         scale: 1;
         dragable.x: 1 1 0;
         dragable.y: 0 0 0;
         dragable.confine: "elm.swallow.bar";
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            min: 16 16;
            max: 16 16;
            fixed: 1 1;
            rel1.relative: 0.5 0.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.relative: 0.5 1.0;
            rel2.to_x: "elm.swallow.bar";
         }
      }
      part { name: "knob"; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            image.normal: "i-radio";
            min: 16 16;
            max: 16 16;
            color_class: "/fg/normal/slider/knob";
         }
         description { state: "clicked" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/pressed/slider/knob";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/knob";
         }
      }
      part { name: "slideevent"; type: RECT; repeat_events: 0;
         scale: 1;
         ignore_flags: ON_HOLD;
         dragable.events: "elm.dragable.slider";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
         description { state: "default" 0.0;
            rel.to: "elm.dragable.slider";
         }
      }
      part { name: "button2"; type: GROUP; mouse_events: 0;
         clip_to: "enable2";
         source: "elm/slider/horizontal/indicator/default";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable2.slider";
         }
         description { state: "hidden" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "elm.dragable2.slider"; type: RECT;
         clip_to: "enable2";
         scale: 1;
         dragable.x: 1 1 0;
         dragable.y: 0 0 0;
         dragable.confine: "elm.swallow.bar";
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            min: 16 16;
            max: 16 16;
            fixed: 1 1;
            rel1.relative: 0.5 0.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.relative: 0.5 1.0;
            rel2.to_x: "elm.swallow.bar";
         }
      }
      part { name: "knob2"; mouse_events: 0;
         clip_to: "enable2";
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel1.to: "elm.dragable2.slider";
            rel2.to: "elm.dragable2.slider";
            image.normal: "i-radio";
            min: 16 16;
            max: 16 16;
            color_class: "/fg/normal/slider/knob";
         }
         description { state: "clicked" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/pressed/slider/knob";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/knob";
         }
      }
      part { name: "slideevent2"; type: RECT; repeat_events: 0;
         clip_to: "enable2";
         scale: 1;
         ignore_flags: ON_HOLD;
         dragable.events: "elm.dragable2.slider";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable2.slider";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.track2.slider"; type: SWALLOW; mouse_events: 0;
         clip_to: "enable2";
         description { state: "default" 0.0;
            rel1.to: "elm.dragable2.slider";
            rel2.to: "elm.dragable2.slider";
         }
      }
      part { name: "enable2"; type: RECT;
         description { state: "default" 0.0;
            rel1.offset: -150 -150;
            rel2.offset: 149 149;
            visible: 0;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "event"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            visible: 0;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
   }
   programs {
      program { signal: "elm,slider,range,enable"; source: "elm";
         script {
            set_int(range, 1);
            set_state(PART:"enable2", "visible", 0.0);
            new m = get_int(slmode);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,slider,range,disable"; source: "elm";
         script {
            set_int(range, 0);
            set_state(PART:"enable2", "visible", 0.0);
            new m = get_int(slmode);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "drag"; source: "elm.dragable*";
         script {
            new r = get_int(range);
            new m = get_int(slmode);
            if (r) update_glow(m);
         }
      }
      program { signal: "mouse,down,1"; source: "elm.dragable.slider";
         action:  STATE_SET "clicked" 0.0;
         target: "knob";
      }
      program { signal: "mouse,up,1"; source: "elm.dragable.slider";
         action:  STATE_SET "default" 0.0;
         target: "knob";
      }
      program { signal: "mouse,down,1"; source: "elm.dragable2.slider";
         action:  STATE_SET "clicked" 0.0;
         target: "knob2";
      }
      program { signal: "mouse,up,1"; source: "elm.dragable2.slider";
         action:  STATE_SET "default" 0.0;
         target: "knob2";
      }
      program { signal: "elm,state,indicator,show"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { signal: "elm,state,indicator,hide"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { signal: "mouse,down,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { name: "popup_show2";
         action:  STATE_SET "hidden" 0.0;
         target: "button";
      }
      program { signal: "mouse,up,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { name: "popup_hide2";
         action:  STATE_SET "default" 0.0;
         target: "button";
      }
      program { signal: "mouse,down,1"; source: "slideevent2";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { signal: "mouse,up,1"; source: "slideevent2";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= LABEL; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~LABEL; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= ICON; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,icon,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~ICON; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { name: "end_show";
         signal: "elm,state,end,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= END; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { name: "end_hide";
         signal: "elm,state,end,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~END; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= UNITS; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         action: SIGNAL_EMIT "limits,visible" "elm";
         target: "limits";
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(slmode);
            m &= ~UNITS; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action: SIGNAL_EMIT "limits,hide" "elm";
         target: "limits";
      }
      program { signal: "elm,state,inverted,on"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= INVERT; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,inverted,off"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~INVERT; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= DISABLE; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~DISABLE; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef END
#undef UNITS
#undef MASKBITS
#undef INVERT
#undef DISABLE
}

group { name: "elm/slider/range/vertical/default";
   alias: "elm/range/vertical/disabled";
#define ICON    1
#define LABEL   2
#define END     4
#define UNITS   8
#define MASKBITS    15
#define INVERT  16
#define DISABLE 32
   script {
      public slmode;
      public range;
      public update_glow(m) {
         new d = m & DISABLE;
         new i = m & INVERT;
         new r = get_int(range);
         if (r) {
            new x1, y1, w1, h1, x2, y2, w2, h2;
            get_geometry(PART:"knob", x1, y1, w1, h1);
            get_geometry(PART:"knob2", x2, y2, w2, h2);
            if (d) {
               if (y2 < y1) {
                  set_state(PART:"glow", "disabled_range_reverse", 0.0);
               } else {
                  set_state(PART:"glow", "disabled_range", 0.0);
               }
            } else {
               if (y2 < y1) {
                  set_state(PART:"glow", "range_reverse", 0.0);
               } else {
                  set_state(PART:"glow", "range", 0.0);
               }
            }
         } else {
            if (d) {
               if (i) {
                  set_state(PART:"glow", "disabled_inverted", 0.0);
               } else {
                  set_state(PART:"glow", "disabled", 0.0);
               }
            } else {
               if (i) {
                  set_state(PART:"glow", "default", 0.0);
               } else {
                  set_state(PART:"glow", "inverted", 0.0);
               }
            }
         }
      }
      public eval_mode(m) {
         new ic = m & ICON;
         new l = m & LABEL;
         new e = m & END;
         new u = m & UNITS;
         new d = m & DISABLE;
         new i = m & INVERT;
         if (i) {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
            }
         } else {
            if (!d) {
               set_state(PART:"base", "default", 0.0);
            } else {
               set_state(PART:"base", "disabled", 0.0);
            }
         }
         if (l) {
            if (!d) {
               set_state(PART:"elm.text", "visible", 0.0);
            } else {
               set_state(PART:"elm.text", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.text", "default", 0.0);
         }
         if (u) {
            if (!d) {
               set_state(PART:"elm.units", "visible", 0.0);
               set_state(PART:"limits", "visible", 0.0);
            } else {
               set_state(PART:"elm.units", "disabled_visible", 0.0);
               set_state(PART:"limits", "disabled_visible", 0.0);
            }
         } else {
            set_state(PART:"elm.units", "default", 0.0);
            set_state(PART:"limits", "default", 0.0);
         }
         if (ic) {
            set_state(PART:"elm.swallow.icon", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.icon", "default", 0.0);
         }
         if (e) {
            set_state(PART:"elm.swallow.end", "visible", 0.0);
         } else {
            set_state(PART:"elm.swallow.end", "default", 0.0);
         }
         if (!d) {
            set_state(PART:"event", "default", 0.0);
            set_state(PART:"dis_clip", "default", 0.0);
            set_state(PART:"knob", "default", 0.0);
            set_state(PART:"knob2", "default", 0.0);
         } else {
            set_state(PART:"event", "disabled", 0.0);
            set_state(PART:"dis_clip", "disabled", 0.0);
            set_state(PART:"knob", "disabled", 0.0);
            set_state(PART:"knob2", "disabled", 0.0);
         }
      }
   }
   parts {
      part { name: "elm.swallow.bar"; type: SWALLOW;
         scale: 1;
         description { state: "default" 0.0;
            min: 20 40;
            max: 20 99999;
            align: 0.5 1.0;
            rel1.to_y: "elm.text";
            rel1.relative: 0.0 1.0;
            rel1.offset: 4 4;
            rel2.to_y: "limits";
            rel2.relative: 1.0 0.0;
            rel2.offset: -5 -5;
            offscale;
         }
      }
      part { name: "base"; type: RECT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            rel.to: "elm.swallow.bar";
            color_class: "/bg/normal/slider/base";
            min: 4 8;
            max: 4 99999;
            fixed: 1 0;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/bg/disabled/slider/base";
         }
      }
      part { name: "glow"; type: RECT; mouse_events: 0;
         description { state: "default" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.to: "base";
            rel2.relative: 1.0 0.5;
            rel2.to_y: "button";
            rel2.to_x: "base";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "inverted" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.0 0.5;
            rel1.to_y: "button";
            rel1.to_x: "base";
            rel2.to: "base";
         }
         description { state: "disabled_inverted" 0.0;
            inherit: "inverted" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "range" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.0 0.5;
            rel2.relative: 1.0 0.5;
            rel1.to_y: "button";
            rel2.to_y: "button2";
            rel1.to_x: "base";
            rel2.to_x: "base";
         }
         description { state: "disabled_range" 0.0;
            inherit: "range" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
         description { state: "range_reverse" 0.0;
            color_class: "/fg/normal/slider/bar";
            rel1.relative: 0.0 0.5;
            rel2.relative: 1.0 0.5;
            rel1.to_y: "button2";
            rel2.to_y: "button";
            rel1.to_x: "base";
            rel2.to_x: "base";
         }
         description { state: "disabled_range_reverse" 0.0;
            inherit: "range_reverse" 0.0;
            color_class: "/fg/disabled/slider/bar";
         }
      }
      part { name: "dis_clip"; type: RECT;
         description { state: "default" 0.0;
            rel1.to: "elm.swallow.icon";
            rel2.to: "elm.swallow.end";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.swallow.icon"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 0 1;
            visible: 0;
            align: 0.5 0.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.to_x: "elm.swallow.bar";
            rel1.offset: 4 -1;
            rel2.offset: -5 -1;
            rel2.relative: 1.0 0.0;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0; aspect_preference: VERTICAL;
            rel1.offset: 4 4;
            rel2.offset: -5 4;
            min: ICMIN ICMIN;
         }
      }
      part { name: "elm.text"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 0 1;
            align: 0.5 0.0;
            rel1.to_y: "elm.swallow.icon";
            rel1.relative: 0.0 1.0;
            rel1.offset: 4 -1;
            rel2.to_y: "elm.swallow.icon";
            rel2.relative: 1.0 1.0;
            rel2.offset: -5 -1;
            color_class: "/fg/normal/slider/text";
            text { font: FN; size: 10;
               text_class: "slider";
               min: 0 0;
               align: 0.5 0.0;
            }
            visible: 0;
            offscale;
            min: 0 ICMIN;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            rel1.offset: 4 4;
            rel2.offset: -5 4;
            text.min: 1 1;
            text.ellipsis: -1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text";
         }
      }
      part { name: "elm.swallow.end"; type: SWALLOW;
         clip_to: "dis_clip";
         scale;
         description { state: "default" 0.0;
            fixed: 0 1;
            visible: 0;
            align: 0.5 1.0;
            rel1.to_x: "elm.swallow.bar";
            rel2.to_x: "elm.swallow.bar";
            rel1.offset: 4 0;
            rel1.relative: 0.0 1.0;
            rel2.offset: -5 -1;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
            aspect: 1.0 1.0;
            aspect_preference: VERTICAL;
            rel1.offset: 4 -5;
            rel2.offset: -5 -5;
            min: ICMIN ICMIN;
         }
      }
      alias: "elm.units.min" "limits:elm.units.min";
      alias: "elm.units.max" "limits:elm.units.max";
      part { name: "limits"; type: GROUP; mouse_events: 0;
         source: "elm/slider/hidden/limit";
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            align: 0.5 1.0;
            max: 0 0;
            fixed: 1 1;
            rel1.to_y: "elm.swallow.end";
            rel1.relative: 0.0 0.0;
            rel1.offset: 4 0;
            rel2.to_y: "elm.swallow.end";
            rel2.relative: 1.0 0.0;
            rel2.offset: -5 -1;
            offscale;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            min: SOURCE;
            max: 9999 9999;
            rel1.offset: 4 -5;
            rel2.offset: -5 -5;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "default" 0.0;
            min: SOURCE;
            max: 9999 9999;
            rel1.offset: 4 -5;
            rel2.offset: -5 -5;
            color: 255 255 255 64; // no cc
         }
      }
      part { name: "elm.units"; type: TEXT; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            visible: 0;
            fixed: 1 1;
            rel1.to_y: "limits";
            rel2.to_y: "limits";
            color_class: "/fg/normal/slider/text/units";
            text { font: FN; size: 10;
               text_class: "slider";
               align: 0.5 1.0;
               min: 1 1;
               ellipsis: -1;
            }
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
         description { state: "disabled_visible" 0.0;
            inherit: "visible" 0.0;
            color_class: "/fg/disabled/slider/text/units";
         }
      }
      part { name: "button"; type: GROUP; mouse_events: 0;
         source: "elm/slider/vertical/indicator/default";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
         }
         description { state: "hidden" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "elm.dragable.slider"; type: RECT;
         scale: 1;
         dragable.x: 0 0 0;
         dragable.y: 1 1 0;
         dragable.confine: "elm.swallow.bar";
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            min: 16 16;
            max: 16 16;
            fixed: 1 1;
            rel1.relative: 0.0 0.5;
            rel1.to_y: "elm.swallow.bar";
            rel2.relative: 1.0 0.5;
            rel2.to_y: "elm.swallow.bar";
         }
      }
      part { name: "knob"; mouse_events: 0;
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            image.normal: "i-radio";
            min: 16 16;
            max: 16 16;
            color_class: "/fg/normal/slider/knob";
         }
         description { state: "clicked" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/pressed/slider/knob";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/knob";
         }
      }
      part { name: "slideevent"; type: RECT; repeat_events: 0;
         scale: 1;
         ignore_flags: ON_HOLD;
         dragable.events: "elm.dragable.slider";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable.slider";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.track.slider"; type: SWALLOW; mouse_events: 0;
         description { state: "default" 0.0;
            max: 0 0;
            rel.to: "elm.dragable.slider";
         }
      }
      part { name: "button2"; type: GROUP; mouse_events: 0;
         source: "elm/slider/vertical/indicator/default";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable2.slider";
         }
         description { state: "hidden" 0.0;
            inherit: "default" 0.0;
            visible: 0;
         }
      }
      part { name: "elm.dragable2.slider"; type: RECT;
         clip_to: "enable2";
         scale: 1;
         dragable.x: 0 0 0;
         dragable.y: 1 1 0;
         dragable.confine: "elm.swallow.bar";
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            min: 16 16;
            max: 16 16;
            fixed: 1 1;
            rel1.relative: 0.0 0.5;
            rel1.to_y: "elm.swallow.bar";
            rel2.relative: 1.0 0.5;
            rel2.to_y: "elm.swallow.bar";
         }
      }
      part { name: "knob2"; mouse_events: 0;
         clip_to: "enable2";
         scale: 1;
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable2.slider";
            image.normal: "i-radio";
            min: 16 16;
            max: 16 16;
            color_class: "/fg/normal/slider/knob";
         }
         description { state: "clicked" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/pressed/slider/knob";
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            color_class: "/fg/disabled/slider/knob";
         }
      }
      part { name: "slideevent2"; type: RECT; repeat_events: 0;
         clip_to: "enable2";
         scale: 1;
         ignore_flags: ON_HOLD;
         dragable.events: "elm.dragable2.slider";
         description { state: "default" 0.0;
            fixed: 1 1;
            rel.to: "elm.dragable2.slider";
            color: 0 0 0 0; // no cc
         }
      }
      part { name: "elm.track2.slider"; type: SWALLOW; mouse_events: 0;
         clip_to: "enable2";
         description { state: "default" 0.0;
            max: 0 0;
            rel.to: "elm.dragable2.slider";
         }
      }
      part { name: "enable2"; type: RECT;
         description { state: "default" 0.0;
            rel1.offset: -150 -150;
            rel2.offset: 149 149;
            visible: 0;
         }
         description { state: "visible" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
      part { name: "event"; type: RECT;
         description { state: "default" 0.0;
            color: 0 0 0 0; // no cc
            visible: 0;
         }
         description { state: "disabled" 0.0;
            inherit: "default" 0.0;
            visible: 1;
         }
      }
   }
   programs {
      program { signal: "elm,slider,range,enable"; source: "elm";
         script {
            set_int(range, 1);
            set_state(PART:"enable2", "visible", 0.0);
            new m = get_int(slmode);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,slider,range,disable"; source: "elm";
         script {
            set_int(range, 0);
            set_state(PART:"enable2", "visible", 0.0);
            new m = get_int(slmode);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "drag"; source: "elm.dragable*";
         script {
            new r = get_int(range);
            new m = get_int(slmode);
            if (r) update_glow(m);
         }
      }
      program { signal: "mouse,down,1"; source: "elm.dragable.slider";
         action:  STATE_SET "clicked" 0.0;
         target: "knob";
      }
      program { signal: "mouse,up,1"; source: "elm.dragable.slider";
         action:  STATE_SET "default" 0.0;
         target: "knob";
      }
      program { signal: "mouse,down,1"; source: "elm.dragable2.slider";
         action:  STATE_SET "clicked" 0.0;
         target: "knob2";
      }
      program { signal: "mouse,up,1"; source: "elm.dragable2.slider";
         action:  STATE_SET "default" 0.0;
         target: "knob2";
      }
      program { signal: "elm,state,indicator,show"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { signal: "elm,state,indicator,hide"; source: "elm";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { signal: "mouse,down,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { name: "popup_show2";
         action:  STATE_SET "hidden" 0.0;
         target: "button";
      }
      program { signal: "mouse,up,1"; source: "slideevent";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { name: "popup_hide2";
         action:  STATE_SET "default" 0.0;
         target: "button";
      }
      program { signal: "mouse,down,1"; source: "slideevent2";
         action:  SIGNAL_EMIT "elm,popup,show" "elm";
         after: "popup_show2";
      }
      program { signal: "mouse,up,1"; source: "slideevent2";
         action:  SIGNAL_EMIT "elm,popup,hide" "elm";
         after: "popup_hide2";
      }
      program { signal: "elm,state,text,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= LABEL; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,text,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~LABEL; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,icon,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= ICON; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,icon,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~ICON; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { name: "end_show";
         signal: "elm,state,end,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= END; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { name: "end_hide";
         signal: "elm,state,end,hidden"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~END; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= UNITS; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,units,visible"; source: "elm";
         action: SIGNAL_EMIT "limits,visible" "elm";
         target: "limits";
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action:  STATE_SET "default" 0.0;
         script {
            new m = get_int(slmode);
            m &= ~UNITS; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,units,hidden"; source: "elm";
         action: SIGNAL_EMIT "limits,hide" "elm";
         target: "limits";
      }
      program { signal: "elm,state,inverted,on"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= INVERT; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,inverted,off"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~INVERT; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,disabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m |= DISABLE; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
      program { signal: "elm,state,enabled"; source: "elm";
         script {
            new m = get_int(slmode);
            m &= ~DISABLE; set_int(slmode, m);
            eval_mode(m);
            update_glow(m);
         }
      }
   }
#undef ICON
#undef LABEL
#undef END
#undef UNITS
#undef MASKBITS
#undef INVERT
#undef DISABLE
}
